<?php

namespace paper\facade;

use paper\component\Facade;
use paper\Config;

class Connection extends Facade
{

    public static function instance(...$args): \paper\db\Connection
    {
        return static::singleton(\paper\db\Connection::class, function () {
            $config = Config::load("database");
            return [ $config['connections'][$config["default_type"]] ];
        });
    }
}